package cn.enilu.flash.bean.entity.house;

import cn.enilu.flash.bean.entity.BaseEntity;
import lombok.Data;
import org.hibernate.annotations.Table;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * @Description
 * @Author Spark
 * @Date Created in (2019/10/30 15:48)
 * @Version v1.0
 * @Modify
 **/
@Entity(name="repair_file")
@Table(appliesTo = "repair_file",comment = "报修附件")
@Data
@EntityListeners(AuditingEntityListener.class)
public class RepairFile extends BaseEntity {

    @Column(name = "repair_id", columnDefinition = "BIGINT COMMENT '报修ID'")
    @NotNull(message = "报修ID未关联")
    private Long repairId;

    @Column(name = "type", columnDefinition = "INT COMMENT '附件类型'")
    @NotNull(message = "附件类型未关联")
    private Integer type;

    @Column(name = "file_id", columnDefinition = "BIGINT COMMENT '文件ID'")
    @NotNull(message = "文件ID未关联")
    private Long fileId;

}
